summaryrefslogtreecommitdiff
path: root/website/src/pages/blog/[...slug].astro
diff options
context:
space:
mode:
Diffstat (limited to 'website/src/pages/blog/[...slug].astro')
-rw-r--r--website/src/pages/blog/[...slug].astro8
1 files changed, 4 insertions, 4 deletions
diff --git a/website/src/pages/blog/[...slug].astro b/website/src/pages/blog/[...slug].astro
index 800c534..0754ea7 100644
--- a/website/src/pages/blog/[...slug].astro
+++ b/website/src/pages/blog/[...slug].astro
@@ -1,20 +1,20 @@
---
-import { type CollectionEntry, getCollection } from 'astro:content';
+import { type CollectionEntry, getCollection, render } from 'astro:content';
import BlogPost from '../../layouts/BlogPost.astro';
export async function getStaticPaths() {
const posts = await getCollection('blog');
return posts.map((post) => ({
- params: { slug: post.slug },
+ params: { slug: post.id },
props: post,
}));
}
type Props = CollectionEntry<'blog'>;
const post = Astro.props;
-const { Content } = await post.render();
+const { Content } = await render(post);
---
<BlogPost {...post.data}>
<Content />
-</BlogPost> \ No newline at end of file
+</BlogPost>